package com.yehuishou.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yehuishou.dao.BackOrderDao;
import com.yehuishou.pojo.BackOrder;
import com.yehuishou.pojo.User;
import com.yehuishou.service.BackOrderService;
@Service
public class BackOrderServiceImpl implements BackOrderService {
	@Resource
	private BackOrderDao backOrderDao;

	@Override
	public void insertAddress(BackOrder backOrder) {
           backOrderDao.insertAddress(backOrder);
	}

	@Override
	public void insertOrder(BackOrder backOrder) {
        backOrderDao.insertOrder(backOrder);
	}

	@Override
	public Integer selectUid(String phone) {
		return backOrderDao.selectUid(phone);
	}

	@Override
	public void insertBack_order(BackOrder backOrder) {
		backOrderDao.insertBack_order(backOrder);
	}

	@Override
	public void insertBack_orders(BackOrder backOrder) {
		backOrderDao.insertBack_orders(backOrder);
		
	}

	@Override
	public boolean selectPhone(String phone) {
		System.out.println("ZA:"+phone);
		List<String> s= backOrderDao.selectPhone(phone);
		if(s.contains(phone)){
			System.out.println("ssssssaaaa");
			return true;
		}else{
			System.out.println("ssssssaaaaaqqqq");
			return false;
		}
		
	}

	@Override
	public void selectAddress(BackOrder backOrder) {
		backOrderDao.selectAddress(backOrder);
		
	}

	@Override
	public void delectAddress(BackOrder backOrder) {
		backOrderDao.delectAddress(backOrder);
		
	}

	@Override
	public void deleteBack_orders(BackOrder backOrder) {
		backOrderDao.deleteBack_orders(backOrder);
	}

	@Override
	public void insertBack_store(BackOrder backOrder) {
		backOrderDao.insertBack_store(backOrder);
		
	}

	@Override
	public List<BackOrder> selectStore() {
		
		return backOrderDao.selectStore();
	}

	@Override
	public void delectBackAddress(BackOrder backOrder) {
		backOrderDao.delectBackAddress(backOrder);
		
	}

	@Override
	public void delectBackStore(BackOrder backOrder) {
		backOrderDao.delectBackStore(backOrder);
		
	}



}
